//package com.zzh.partnersys.im.rocketmq.consumer;
//
//import com.zzh.partnersys.chat.message.request.TeamChatEmojiRequestMessage;
//import com.zzh.partnersys.entity.TeamMessageDO;
//import com.zzh.partnersys.rocketmq.contant.MQConstant;
//import com.zzh.partnersys.service.TeamMessageService;
//import org.apache.rocketmq.spring.annotation.MessageModel;
//import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
//import org.apache.rocketmq.spring.core.RocketMQListener;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.stereotype.Component;
//
///**
// * @author ??????
// * @version 1.0
// * ����Ⱥ�ĵ���Ϣ������??
// */
//@RocketMQMessageListener(
//        topic = MQConstant.CHAT_GROUP_EMOTION_TOPIC,
//        consumerGroup = MQConstant.CONSUMER_GROUP_TEAM_CHAT_EMOJI,
//        messageModel = MessageModel.BROADCASTING)
//@Component
//public class ChatTeamEmojiMQConsumer implements RocketMQListener<TeamChatEmojiRequestMessage> {
//
//    @Autowired
//    private TeamMessageService teamMessageService;
//
//    @Override
//    public void onMessage(TeamChatEmojiRequestMessage teamChatEmojiRequestMessage) {
//        Long fromUid = teamChatEmojiRequestMessage.getFromUid();//˭����Ϣ
//        Long teamId = teamChatEmojiRequestMessage.getTeamId();//�����ĸ�??
//        String content = teamChatEmojiRequestMessage.getContent();
//
//        // �����Ϣ��team_message??
//        TeamMessageDO teamMessageDO = new TeamMessageDO();
//        teamMessageDO.setTeamId(teamId);
//        teamMessageDO.setFromUid(fromUid);
//        teamMessageDO.setContent(content);
//        teamMessageDO.setType(2);
//
//
//        //todo ��������(�첽����?)
//        Long id = teamMessageService.insertData(teamMessageDO);
//        if (id == null){
//            System.out.println("ʧ��");
//            //todo ����ʧ�� ���������������ʧ���أ���
//        }
//    }
//
//
//}
